<!DOCTYPE html>
<html style="overflow-x:auto;overflow-y:auto;">
	<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>JAVIS电商用户行为分析与可视化平台</title>
    <script src="/static/manager/jquery-1.8.3.min.js" type="text/javascript"></script>
    <link href="/static/manager/bootstrap.min.css" type="text/css" rel="stylesheet"/>
    <script src="/static/manager/bootstrap.min.js" type="text/javascript"></script>

    <script>
        var _hmt=_hmt||[];(function(){var hm=document.createElement("script");hm.src="//hm.baidu.com/hm.js?82116c626a8d504a5c0675073362ef6f";var s=document.getElementsByTagName("script")[0];s.parentNode.insertBefore(hm,s);})();
    </script>
	<script type="text/javascript">
		$(document).ready(function() {
            $("#btnSubmit").click(function(){
                // 数据校验
                let account = $("#account").val();
                if(account == undefined || account == ""){
                    alert("请输入会员账号！");
                    return;
                }
                let password = $("#password").val();
                if(password == undefined || password == ""){
                    alert("请输入会员密码！");
                    return;
                }
                // 提交form表单
                $("#member_form").submit();
            });

            $("#head_url").click(function(){
            	$("#headUrl").text("");
            });
		});
	</script>
	<style type="text/css">
		#table1{
			margin:1px;
			padding:1px;
		}
		#table1 tr td{
			margin:1px;
			padding:1px;
		}
	</style>

</head>
<body>

	<ul class="nav nav-tabs">
		<li class="active"><a href="/manager/updateMember/{{member.id}}">会员信息修改</a></li>
	</ul><br>
	{{msg}}
	<form id="member_form" class="form-horizontal" action="/manager/updateMember/{{member.id}}" method="post" novalidate="novalidate" enctype="multipart/form-data">
		<table class="table table-bordered table-condensed">
			<tbody><tr>
				<td><label class="control-label">会员账号：</label></td>
				<td>
					<input id="account" name="account" class="input-xlarge required" type="text" value="{{member.account}}" maxlength="100">
					<span class="help-inline"><font color="red">*</font> </span>
				</td>
				<td>
					<label class="control-label">会员密码：</label>
				</td>
				<td>
					<input id="password" name="password" class="input-xlarge " type="password" value="{{member.password}}" maxlength="120">
				</td>
			</tr>
			<tr>
				<td><label class="control-label">会员性别：</label></td>
				<td>
					<input type="radio" name="gender" value="0"> 男 &nbsp;&nbsp;
					<input type="radio" name="gender" value="1"> 女
					<script>
						$("input[name='gender'][value={{member.gender}}]").prop("checked", true);
					</script>
				</td>
				<td><label class="control-label">出生日期：</label></td>
				<td><input id="birthday" name="birthday" class="input-xlarge" type="text" value="{{member.birthday |date:'Y-m-d h:m'}}" maxlength="20"></td>
			</tr>

			<tr>
				<td><label class="control-label">真实姓名：</label></td>
				<td><input id="realName" name="realName" class="input-xlarge" type="text" value="{{member.realName}}" maxlength="20"></td>
				<td><label class="control-label">会员电话：</label></td>
				<td><input id="phone" name="phone" class="input-xlarge" type="text" value="{{member.phone}}" maxlength="20"></td>
			</tr>

			<tr>
				<td><label class="control-label">电子邮件：</label></td>
				<td><input id="email" name="email" class="input-xlarge" type="text" value="{{member.email}}" maxlength="20"></td>
				<td><label class="control-label">所属店铺：</label></td>
				<td><input id="shopId" name="shopId" class="input-xlarge" type="text" value="{{member.shopId}}" maxlength="20"></td>
			</tr>

			<tr>
				<td><label class="control-label">会员积分：</label></td>
				<td><input id="points" name="points" class="input-xlarge" type="text" value="{{member.points}}" maxlength="20"></td>
				<td><label class="control-label">会员余额：</label></td>
				<td><input id="balance" name="balance" class="input-xlarge" type="text" value="{{member.balance}}" maxlength="20"></td>
			</tr>



			<tr>
				<td><label class="control-label">会员类别：</label></td>
				<td>
					<select id="type" name="type" class="input-xlarge  select2-offscreen" tabindex="-1">
						<option value="" selected="selected">请选择</option>
						<option value="0">新增会员</option>
						<option value="1">新增领卡会员</option>
						<option value="2">新增消费会员</option>
					</select>

				</td>
				<td><label class="control-label">会员状态：</label></td>
				<td>
					<select id="status" name="status" class="input-xlarge  select2-offscreen" tabindex="-1">
						<option value="">请选择</option>
						<option value="0">未审核</option>
						<option value="1">已审核</option>
						<option value="2">已过期</option>
					</select>
					<script>
						$("#type").val({{member.type}});
						$("#status").val({{member.status}});
					</script>
				</td>
			</tr>
			<tr>
				<td><label class="control-label">所在省份：</label></td>
				<td><input id="province" name="province" class="input-xlarge" type="text" value="{{member.province}}" maxlength="20"></td>
				<td><label class="control-label">所在城市：</label></td>
				<td><input id="city" name="city" class="input-xlarge" type="text" value="{{member.city}}" maxlength="20"></td>
			</tr>

			<tr>
				<td><label class="control-label">地址：</label></td>
				<td><textarea id="address" name="address" maxlength="128" class="input-xlarge " rows="2">{{member.address}}</textarea></td>
				<td><label class="control-label">上传头像：</label></td>
				<!--<td><textarea id="remark" name="remark" maxlength="128" class="input-xlarge " rows="2"></textarea></td>-->
				<td>
					<input id="head_url" type="file" name="headUrl" value="">
					<span id="headUrl">{{member.headUrl}}</span>
				</td>

			</tr>
		</tbody></table>

		<div class="form-actions">
			<input id="btnSubmit" class="btn btn-primary" type="button" value="保 存">&nbsp;
			<input id="btnCancel" class="btn" type="button" value="返 回" onclick="history.go(-1)">
		</div>
	</form>

	<script type="text/javascript">//<!-- 无框架时，左上角显示菜单图标按钮。
		if(!(self.frameElement && self.frameElement.tagName=="IFRAME")){
			$("body").prepend("<i id=\"btnMenu\" class=\"icon-th-list\" style=\"cursor:pointer;float:right;margin:10px;\"></i><div id=\"menuContent\"></div>");
			$("#btnMenu").click(function(){
				top.$.jBox('get:/jeesite/a/sys/menu/treeselect;JSESSIONID=3baf732ded45486a8f110d13601a4c9b', {title:'选择菜单', buttons:{'关闭':true}, width:300, height: 350, top:10});
				//if ($("#menuContent").html()==""){$.get("/jeesite/a/sys/menu/treeselect", function(data){$("#menuContent").html(data);});}else{$("#menuContent").toggle(100);}
			});
		}//-->
	</script>

</body></html>